package com.itheima.demo7_实现多态.继承时的多态;
//继承时的多态
//父类
 public abstract class Animal {
    public abstract void eat();
}

//子类
class Dog extends Animal {
     public void eat() {
         System.out.println("狗吃骨头...");
     }
}

 class Cat extends Animal {
     public void eat() {
         System.out.println("猫吃鱼....");
     }
}

